extension UrlParm on Map {
  String get queryParms {
    var str = '';
    forEach((key, value) {
      str += '$key=${value.toString()}&';
    });

    return str.substring(0, str.length - 1);
  }
}

extension UrlMap on String {
  Map<String, dynamic> get parm {
    var s = this;
    if (contains('?')) {
      s = split('?').last;
    }
    var l = s.split('&');
    Map<String, dynamic> args = {};
    for (var e in l) {
      var ll = e.split('=');
      args[ll.first] = ll.last;
    }
    return args;
  }
}
